<div class="uk-layui-form" >
	<div id="xiaoetopic">
		<div class="row">
			<div class="co-lg-12" style="width: 100%">
				<div class="box default-box" >
					<table class="layui-table" lay-skin="line">
					  <thead>
					  	<#if topicsList?? && topicsList.content?size gt 0 >
						<tr>
							<th>
							  <input type="checkbox"  id="all" onclick="$('.ids').prop('checked' , $(this).prop('checked'));"/>
						  	</th>
						  	<th >标题（${topicsList.totalElements!''}）</th>
						</tr> 
						</#if>
					  </thead>
					  <tbody class="topic_item">
						<#if topicsList?? && topicsList.content?size gt 0 >
						<#list topicsList.content as topics>
						<tr>
						  <td style="width:1%;">
							<input type="checkbox" class="ids" name="ids"  value="${topics.title!''}" data-id="${topics.id!''}"/>
						  </td>
						  <td>${topics.title!''}</td>
						</tr>
						</#list>
						<#else>
							<div class="ukefu-empty">
								<i class="layui-icon"></i>
								<div style="">
									还没有问题记录
								</div>
							</div>
						</#if>
					  </tbody>
					</table>
					<div class="layui-form-button" >
						<div class="layui-button-block">
							<button class="layui-btn" lay-submit lay-filter="hotmsgForm">立即提交</button>
							<button  class="layui-btn layui-btn-primary" lay-submit  lay-filter="formDemo">确定</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row" shtyle="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>
</div>
<script>
layui.use('form', function(){
	var form = layui.form;
	form.render(); //更新全部
  	form.on('submit(hotmsgForm)', function(data){
  		var targetIFrame = eval(iframe);
  		if($(".topic_item :checked").val()){
  			console.log($(".topic_item :checked").val());
  			targetIFrame.Proxy.callback("processHotMsgFunction(data)",$(".topic_item :checked")) ;
  		}
  		layer.closeAll("page");
    	return false;
  	});
});
</script>
<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  <#if msg??>
		  top.layer.msg('${msg}');
		  </#if>
		  laypage.render({
				elem: 'page'
				,pages: <#if topicsList??>${topicsList.totalPages}<#else>0</#if> //总页数
				,curr:<#if topicsList??>${topicsList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						loadURL("/apps/xiaoe/topicshot.html?aiid=${aiid!''}&p="+data.curr,"#xiaoetopic");
					}
				}
		   });
		});
</script>